a=input()
b=a[:-6]
c=a[-6:-3]
d=a[-3]
e=a[-2:]
print(f"{b} million {c} thousand {d} hundred and {e}")